<template>
  <div>
    <div id="content" :style="my_card_imgUrl" class="canvas_content">
      <img :src="receiveqrcode" alt="" width="100%" height="100%" />
    </div>
  </div>
</template>
<script>
import { Image, Row, Col, Divider, Toast } from 'vant';
import icon from '@/assets/images/card-share/icon.png';
import receiveqrcode from '@/assets/images/receiveqrcode.jpg';
export default {
  name: 'receive-qrcode',
  data() {
    return {
      nickName: '',
      receiveqrcode: receiveqrcode,
      positionName: '',
      avatar: icon,
      my_card_imgUrl: {
        backgroundImage: `url(${receiveqrcode})`,
        backgroundRepeat: 'no-repeat',
        backgroundSize: '100% 100%',
      },
      headImgBg: icon, //'https://xintu361.oss-cn-qingdao.aliyuncs.com/32uqbv6gx4bp4m9tq48w.gif',
    };
  },
  created() {
    //this.getParams();
  },
  methods: {
    strlen(str) {
      var len = 0;
      for (var i = 0; i < str.length; i++) {
        var c = str.charCodeAt(i);
        //单字节加1
        if ((c >= 0x0001 && c <= 0x007e) || (0xff60 <= c && c <= 0xff9f)) {
          len++;
        } else {
          len += 2;
        }
      }
      return len;
    },
    // getParams () {
    //   // 取到路由带过来的参数
    //   this.nickName = decodeURI(this.$route.query.nickName) || '';
    //   this.avatar = decodeURI(this.$route.query.avatar) || '';
    //   this.positionName = decodeURI(this.$route.query.positionName) || '';
    // },
  },
  components: {
    [Image.name]: Image,
    [Row.name]: Row,
    [Col.name]: Col,
    [Divider.name]: Divider,
  },
};
</script>
<style>
.view-router {
  padding-bottom: 0 !important;
}

#content {
  width: 100%;
  height: 100%;
}
</style>